package fr.louloutes.lolshooter;

import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

/**
 * @author Louloute Game Activity Ecran de jeu principal - Va proposer un écran
 *         de jeu pour du shoot à scrolling vertical, avec calcul de score,
 *         bonus, ennemis,...
 */
public class GameAct extends LOLActivity
{
	/** Called when the activity is first created. */
	@Override
	public void onCreate( Bundle savedInstanceState )
	{
		Utils.Log( "Game onCreate", this );
		super.onCreate( savedInstanceState );
		setContentView( R.layout.game );
	}

	/*
	 * (non-Javadoc)
	 * @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
	 * 
	 * Création d'un menu pour l'Activity GameAct
	 */
	@Override
	public boolean onCreateOptionsMenu( Menu menu )
	{
		super.onCreateOptionsMenu( menu );
		getMenuInflater().inflate( R.menu.gameoptions, menu );
		menu.findItem( R.id.help_menu_item ).setIntent(
				new Intent( this, HelpAct.class ) );
		menu.findItem( R.id.settings_menu_item ).setIntent(
				new Intent( this, SettingsAct.class ) );
		menu.findItem( R.id.score_menu_item ).setIntent(
				new Intent( this, ScoresAct.class ) );
		return true;

	}

	@Override
	public boolean onOptionsItemSelected( MenuItem item )
	{
		super.onOptionsItemSelected( item );
		startActivity( item.getIntent() );
		return true;
	}

	@Override
	public void onStart()
	{
		Utils.Log( "Game onStart", this );
		super.onStart();
	}

	@Override
	public void onResume()
	{
		Utils.Log( "Game onResume", this );
		super.onResume();
	}

	@Override
	public void onPause()
	{
		Utils.Log( "Game onPause", this );
		super.onPause();
	}

	@Override
	public void onStop()
	{
		Utils.Log( "Game onStop", this );
		super.onStop();
	}

	@Override
	public void onDestroy()
	{
		Utils.Log( "Game onDestroy", this );
		super.onDestroy();
	}

}